<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>指尖金融</title>
<link href="../../../res/png/icon.png" rel="shortcut icon" />
<link href="../../../css/common.css" type="text/css" rel="stylesheet">
<link href="../../../css/base.css" type="text/css" rel="stylesheet">
<link href="financingManage.css" type="text/css" rel="stylesheet">
<link href="../../../res/png/icon.png" rel="shortcut icon" />
<link href="../../../component/autocomplete/jquery.autocomplete.css"
	rel="stylesheet" type="text/css" />

<link rel="stylesheet" type="text/css"
	href="../../../js/My97DatePicker/skin/WdatePicker.css" />
</head>
<body>
	<div class="wrapper">
		<!-- 顶部菜单栏 -->
		<div id="header" class="header"></div>
		<div class="main" id="main">
			<!-- 左侧菜单栏 -->
			<div id="leftMenu" class="left"></div>
			<div class="pages">
				<div class="page table-section none" id="financingManage">
					<p class="table-head">
						<label class="table-title">当前位置:融资项目</label>
					</p>
					<div class="table-search">
						<div class="searchLine">
							<div>
								申请时间：<input class="Wdate FromTime" type="text"
									id="applyTimeStart"
									onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false,readOnly:true,maxDate:'#F{$dp.$D(\'applyTimeEnd\',{d:0})}'})" />-<input
									class="Wdate ToTime" type="text" id="applyTimeEnd"
									name="publishToTime"
									onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false,readOnly:true,minDate:'#F{$dp.$D(\'applyTimeStart\',{d:1})}'})" />
							</div>
							<div>
								融资编号：<input type="text" id="financeNumber" placeholder="请输入融资编号" />
							</div>
							<div>
								融资货物：<input id="commodityName" type="text" placeholder="请输入融资货物" />
							</div>
						</div>
						<div class="searchLine">
							<div>
								融资金额：<input id="minAmount" type="text" />-<input id="maxAmount"
									type="text" />
							</div>
							<div>
								状态： <select class="sel-recommend" id="financeState">
									<option value="">全部</option>
									<option value="0">已取消</option>
									<option value="1">审批中</option>
									<option value="2">待确认</option>
									<option value="3">已审批</option>
									<option value="4">审批不通过</option>
									<option value="5">合同已签订</option>
									<option value="6">待验货</option>
									<option value="7">已验货</option>
									<option value="8">待放款</option>
									<option value="9">已收款</option>
									<option value="10">提货审批中</option>
									<option value="11">提货审批不通过</option>
									<option value="12">换货审批中</option>
									<option value="13">换货审批不通过</option>
									<option value="14">提货已审批</option>
									<option value="15">待放货</option>
									<option value="16">放货中</option>
									<option value="17">已签收</option>
									<option value="18">已完成</option>
									<option value="19">已评价</option>
								</select>
							</div>
							<div>
								合同序列号：<input type="text" name="financeContractSerialNumber"
									placeholder="请输入合同序列号" />
							</div>
						</div>
						<div class="searchLine">
							<div>
								融资企业：<input type="text" id="enterpriseName"
									placeholder="请输入融资企业" />
							</div>
							<div>
								运单号：<input type="text" name="waybillNumber" placeholder="请输入运单号" />
							</div>
							<div>
								箱号：<input type="text" name="caseNumber" placeholder="请输入箱号" />
							</div>
						</div>
						<div class="searchLine">
							<div>
								业务类型：
								<select name="productType">		
									<option value="0">全部</option>
									<option value="1">舱单代采</option>
									<option value="2">舱单质押</option>
									<option value="3">仓储质押</option>
									<option value="4">保理融资</option>
									<option value="5">代理采购</option>
									<option value="6">代理销售</option>
								</select>
							</div>
							<div></div>
							<div>
								<button class="table-search-button" id="financeSearch">查询</button>
							</div>
						</div>
					</div>
					<p>
					<table class="table" cellspacing="0px" cellpadding="0px">
						<tr class="table_title">
							<th width="5%">序号</th>
							<th width="10%">申请时间 | 融资编号</th>
							<th width="10%">融资客户</th>
							<th width="10%">合同序列号</th>
							<th width="10%">业务类型</th>
							<th width="10%">融资货物</th>
							<th width="5%">数量</th>
							<th width="10%">申请金额</th>
							<th width="10%">融资金额</th>
							<th width="10%">订单状态</th>
							<th width="10%">操作</th>
						</tr>
						<tbody id="financeListBody"></tbody>
					</table>
					<div id="pagenation" class="pagerCon"></div>
					<script type="text/template" id="financeListTpl">
									{@each datas as it, index}
										<tr class="tr_style table-data"  financeId="${it.financeId}" productType="${it.productType}">
											<td>${index*1 + 1}</td>
											<td>
												${getValueByKey(31, it.financeType)}
												${it.applicationDateTime}
												<br/><span class="">${it.financeNumber}</span>
											</td>
											<td>${it.enterpriseName}</td>
											<td>${it.financeContractDetail.financeContractSerialNumber}</td>
											<td>${getValueByKey(7, it.productType)}</td>
											<td>
												{@each it.bulkstocks as that}
													${that.bulkstockName}(${that.specification})<br/>
												{@/each}
											</td>
											<td>
												{@each it.bulkstocks as d}
													${d.quantity}(${d.unit})<br/>
												{@/each}
											</td>
											<td>&#65509;${formatCurrency((it.applicationAmount / 10000).toFixed(4))} 万元</td>
											<td>&#65509;${formatCurrency((it.financeAmount / 10000).toFixed(4))}万元</td>
											<td>${getValueByKey(30, it.financeState)}</td>
											<td class="pl10">
												<a id="detail">详情 </a> <a class="bulkstockListing">货物一览 </a> <a class="calcelApply">取消 </a>
											</td>
										</tr>
									{@/each}
								</script>

					<script type="text/template" id="financeListTpl1">
									{@each datas as it}
										{@if it.abnormal === 0}
										<tr class="tr_style table-data"  financeId=${it.financeId}>
											<td>
												{@if it.financeType==1}
													<span class="order_status">融资</span>
												{@else if it.financeType==2}
													<span class="order_status">换货 </span>
												{@/if}
												&nbsp;&nbsp;${it.applicationDateTime}
												<br/><span class="order_num">${it.financeNumber}</span>
											</td>
											<td>${it.enterpriseName}</td>
											<td>
												{@each it.bulkstocks as that}
													${that.bulkstockName}(${that.specification})<br/>
												{@/each}
											</td>
											<td>
												{@each it.bulkstocks as d}
													${d.quantity}<br/>
												{@/each}
											</td>
											<td>&#65509;${it.applicationAmount}</td>
											<td>&#65509;${it.financeAmount}</td>
											
											<td>${getValueByKey(30, it.financeState)}</td>
											<td><a id="detail">详情1</a></td>
										</tr>
										{@/if}
									{@/each}
								</script>
					</p>
				</div>
			</div>

		</div>

		<!-- 底部 -->
		<div id="footer" class="none footer"></div>
		<!--确认框-->
		<div class="dialog none" id="confirmDialog">
			<div class="dialogTitle"></div>
			<button class="closeDiv">×</button>
			<div class="dialogContent"></div>
			<div class="footerBtn">
				<div class="dialogBtn dialogHandlerBtn radius_shadow">确定</div>
			</div>
		</div>
		<div id="fullBg" class="fullBg none"></div>
		<div id="popdialog"></div>
	</div>
	<script type="text/javascript" src="../../../js/jquery-1.11.1.min.js"></script>
	<script src="../../../component/layer/layer.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript" src="../../../js/seajs/sea.js"></script>
	<script type="text/javascript" src="../../../js/seajs/seajs-text.js"></script>
	<script type="text/javascript" src="../../../js/seajs/seajs-css.js"></script>
	<script type="text/javascript" src="../../../js/platform/config.js"></script>
	<script type="text/javascript" src="../../../js/juicer-min.js"></script>
	<script type="text/javascript"
		src="../../../component/autocomplete/jquery.autocomplete.js"></script>

	<script src="../../../js/ajaxfileupload.js" type="text/javascript"
		charset="utf-8"></script>
	<script src="../../../js/My97DatePicker/WdatePicker.js"
		type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		seajs.use('./financingManage', function(financingManage) {
			financingManage.init();
		});
	</script>
</body>
</html>